import { Inject } from "@nestjs/common";
import {Injectable} from '@nestjs/common';
import { UseClassLoggerService, UseValueLoggerService, 
    UseFactoryLoggerService, UseValueLoggerServiceStringToken} from './logger.service';

//可被注入别的服务
@Injectable()
export class AppService{
    constructor(
        private useClassLoggerService: UseClassLoggerService,
        private useValueLoggerService: UseValueLoggerService,
        private useFactoryLoggerService: UseFactoryLoggerService,
        @Inject('StringToken') private useValueLoggerServiceStringToken: UseValueLoggerServiceStringToken
        ){

    }
    getHello(){
        this.useClassLoggerService.log('useClassLoggerService');
        this.useValueLoggerService.log('useValueLoggerService');
        this.useFactoryLoggerService.log('useFactoryLoggerService');
        this.useValueLoggerServiceStringToken.log('useValueLoggerServiceStringToken');
        return 'hello'
    }
}